package org.mybatis3.test5;

public class Person {

    private String name;
    private Integer age;
    private String gender;
    private Person son;
    public String getName(){
        return name;
    }

    public Person(){}
    public Person(String name){
        this.name=name;
    }
    public Person(String name,Integer age,String gender,Person son){
        this.name=name;
        this.age=age;
        this.gender=gender;
        this.son=son;
    }

    public void print(){
        System.out.println("姓名"+this.name+"年龄"+this.age+"性别"+this.gender);
        if (this.son!=null){
            System.out.println("儿子："+this.son.name);
        }
    }
}
